<%@page import="java.util.List"%>
<%@page import="com.mongodb.DBObject"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <meta charset="UTF-8">
  <meta name="viewport" content="target-densitydpi=device-dpi,width=device-width,initial-scale=1.0,minimum-scale=0.1,maximum-scale=1,user-scalable=no" />
  <title>信息列表</title>
<link rel=stylesheet  type="text/css" href="css/index.css">
<link  rel="stylesheet" type="text/css" href="css/header.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">

<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="js/index.js" type="text/javascript"></script>
<script src="js/jquery.ScrollPic.js" type="text/javascript"></script>
</head>
<body>

 <div class="menu">
    <ul>
      <li><img id="tubiao" src="images/tubiao.png" alt="HPU比特能"/></li>
      <li class="current"><a href="#">  </a></li>
      <li><a href="javascript:void(0)" style="margin-left:30px;">基于智能计算的信息推荐系统</a></li>
    </ul>
  </div>

  <div id="content">
    	<% 
      	List<DBObject> list=(List<DBObject>)request.getAttribute("listname");
    	if(list!=null){
       	double length=list.size();
	     if(length>0){
	    	 //得到行数
	    	 double rownum=Math.ceil(length/3);
	    	 //得到余数
	    	 double yu=length%3;
	    	 //内循环
	    	 double count=3;
	    	 for(int i=0;i<length;)
	    	 {
%>
     <div class="row">
	     <%
	    
	     //当为行数的时候  循环余数
	     if(Math.ceil(i/3)==rownum-1){
	    	 count=yu;
	     }
	     
	     for(int j=0;j<count;j++)
    	 {
	     %>
	
           <div class="col-xs-6 col-md-4">
            <div class="col-zhuan">
            <!--  推荐第1个专家-->
               <ul>
                  <li><span class="glyphicon glyphicon-star-empty" aria-hidden="true"> <span>评价：</span></span>
                  <%
                    int s=Integer.parseInt(list.get(i+j).get("dengji").toString());
                    for(int k=1;k<=s;k++){
                  %>
                    <img src="images/star.png" alt="等级">
                   <%} %>
                  </li>
                  <li><span class="glyphicon glyphicon-user" aria-hidden="true"> <span>姓名：</span></span><%=list.get(i+j).get("expert_name") %></li>
                  <li><span class="glyphicon glyphicon-book" aria-hidden="true"> <span>方向：</span></span><%=list.get(i+j).get("research") %></li>
                  <li><span class="glyphicon glyphicon-map-marker" aria-hidden="true"> <span>机构：</span></span><%=list.get(i+j).get("expert_org") %></li>
               
               </ul>
               <div class="boorf"><a href="expertservlet?expert_name=<%=list.get(i+j).get("expert_name")%>"><button type="button" class="btn btn-primary">查看</button></a></div>
             </div>
           </div>
      <% //第二层循环
    	 }
	     %>
         </div>
      
<%     
	     //第一层循环
	     i+=count;
	       }
	    	 
	    	 }
    	}else{
%>
     <h3>没有信息了哦^o^！</h3>
 <%
	    	 }
%>	

         


<div id="foolter">
 hpuacm&copy;版权所有
</div>
</div>



</body>
</html>